package com.zqf.test;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class GetPluginVer extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doPost(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setCharacterEncoding("utf-8");
		
		if (request.getParameter( "tiger ").equals( "login ")) 
			 
		System.out.println("pp");
		String ver = request.getParameter("jsonpcallback");
		String str = "{\"version\":\"123\",\"code\":\"123\",\"msg\":\"123\"}";
		str = ver + "("+ str +")";
		System.out.println(str);
		response.getWriter().print(str);
	}
	public void getCameraInfo(HttpServletRequest request, HttpServletResponse response) throws IOException{
		response.setCharacterEncoding("utf-8");
		String cameraInfo = request.getParameter("jsonpcallback");
		String info="{\"code\":\"code\",\"msg\":\"msg\",\"status\":\"status\",\"resolution_x\":\"resolution_x\",\"resolution_y\":\"resolution_y\",\"model\":\"model\"}";
		info=cameraInfo+"("+info+")";
		System.out.println(info);
		response.getWriter().print(info);
	}
}
